<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>

<script type="text/javascript" src="../js/jquery.1.8.min.js"></script>

</head>
<body>
	<form action="dotest.htm"  method="post" enctype="application/json">
		<input type="text" name="" id="jsonValue"/>
		<input type="submit" value="o k" />
	</form>
	<a href="javascript:void(0)" onclick="getData()">获取数据</a>
	<script type="text/javascript">
		function getData(){
			$.ajax({
				url:'../requestbody/getjsondata.json',
				dataType:'json',
				type:'post',
				success:function(data){
					//$('#jsonValue').val(data);
					$('#jsonValue').val(JSON.stringify(data));
				},
				error:function(){
					alert('异常');
				}
			});
		}
	</script>
</body>
</html>